﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        String ReturnUrl = Request.QueryString["ReturnUrl"];
        if (string.IsNullOrEmpty(ReturnUrl))
        {
            Response.Redirect("~/Login_M.aspx");

        }
        else if (ReturnUrl.ToLower().Contains("/user/"))
        {
            Response.Redirect("~/Login_U.aspx?ReturnUrl=" + Server.UrlEncode(ReturnUrl));

        }
        else if (ReturnUrl.ToLower().Contains("/manage/"))
        {
            Response.Redirect("~/Login_M.aspx?ReturnUrl=" + Server.UrlEncode(ReturnUrl));
        }
        else
        {
            Response.Redirect("~/Login_M.aspx");
        }

    }
}